package com.longxiao.entity;

import java.util.Date;

import com.longxiao.enums.ClassroomStatus;

public class Classroom {


    private Integer id;

    private String tchId;

    private String tchName;

    private Date startTime;

    private Date endTime;

    private Integer stuCount;

    private Byte status;

    private Integer courseId;

    private String courseName;

    private String level;

    private Integer chapterId;

    private String chapterName;
    
    private String busiName;

    private String chapterUrl;

    private Date createdTime;

    private Date modifiedTime;
    
    private String statusStr;


    public Classroom() {

    }

    public Classroom(
            String tchId, Date startTime, Date endTime,
            Integer courseId, String level, Integer chapterId, String chapterUrl,
            String tchName
        ) {
        this.tchId = tchId;
        this.startTime = startTime;
        this.endTime = endTime;
        this.courseId = courseId;
        this.level = level;
        this.chapterUrl = chapterUrl;
        Date curr = new Date();
        this.createdTime = curr;
        this.modifiedTime = curr;
        this.chapterId = chapterId;
        this.tchName = tchName;
    }

    @Override
    public String toString() {
        return "Classroom{" +
                "id=" + id +
                ", tchId='" + tchId + '\'' +
                ", tchName='" + tchName + '\'' +
                ", startTime=" + startTime +
                ", endTime=" + endTime +
                ", stuCount=" + stuCount +
                ", status=" + status +
                ", courseId=" + courseId +
                ", courseName='" + courseName + '\'' +
                ", level='" + level + '\'' +
                ", chapterId=" + chapterId +
                ", chapterName='" + chapterName + '\'' +
                ", chapterUrl='" + chapterUrl + '\'' +
                ", createdTime=" + createdTime +
                ", modifiedTime=" + modifiedTime +
                '}';
    }
    
    

    public String getStatusStr() {
    	if(status == null) {
    		return "";
    	}
    	ClassroomStatus cs = ClassroomStatus.getStatus(status);
    	if(cs != null) {
    		return cs.getDesc();
    	}
		return "";
	}

	public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTchId() {
        return tchId;
    }

    public void setTchId(String tchId) {
        this.tchId = tchId == null ? null : tchId.trim();
    }

    public Date getStartTime() {
        return startTime;
    }

    public void setStartTime(Date startTime) {
        this.startTime = startTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Integer getStuCount() {
        return stuCount;
    }

    public void setStuCount(Integer stuCount) {
        this.stuCount = stuCount;
    }

    public Byte getStatus() {
        return status;
    }

    public void setStatus(Byte status) {
        this.status = status;
    }

    public Integer getCourseId() {
        return courseId;
    }

    public void setCourseId(Integer courseId) {
        this.courseId = courseId;
    }

    public String getLevel() {
        return level;
    }

    public void setLevel(String level) {
        this.level = level == null ? null : level.trim();
    }

    public Integer getChapterId() {
        return chapterId;
    }

    public void setChapterId(Integer chapterId) {
        this.chapterId = chapterId;
    }

    public String getChapterUrl() {
        return chapterUrl;
    }

    public void setChapterUrl(String chapterUrl) {
        this.chapterUrl = chapterUrl == null ? null : chapterUrl.trim();
    }

    public Date getCreatedTime() {
        return createdTime;
    }

    public void setCreatedTime(Date createdTime) {
        this.createdTime = createdTime;
    }

    public Date getModifiedTime() {
        return modifiedTime;
    }

    public void setModifiedTime(Date modifiedTime) {
        this.modifiedTime = modifiedTime;
    }

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getChapterName() {
        return chapterName;
    }

    public void setChapterName(String chapterName) {
        this.chapterName = chapterName;
    }

    public String getBusiName() {
		return busiName;
	}

	public void setBusiName(String busiName) {
		this.busiName = busiName;
	}

	public String getTchName() {
        return tchName;
    }

    public void setTchName(String tchName) {
        this.tchName = tchName;
    }
}